<html>
<head>
    <script src="/js/validate.js" type="text/javascript"></script>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body style="background-color: transparent">
<form id="id-form" name="frm" method="post" action="/danhmuc/category/save">
    <input type=hidden name="id" value="<?=$this->data[id] ?>" />
        <table valign="center">
        <?php $id=$this->data[id]; ?>
        <tr>
            <td nowrap="nowrap">Tên tour<font color="red">*</font></td>
            <td><input class="inp-form" id="idName" name ="name" value="<?=$this->data[name];?>"type ="text" size ="30" maxlength="50">
                <span style="color: red" id="errtname"></span>
            </td>
        </tr>
         <tr>
            <td nowrap="nowrap">Kích hoạt
            <input type="checkbox" id="idkichhoat" name="kichhoat"  <?php if ($this->data[status] == 1)echo "checked";?>  
            value="1"  />
        </tr>      
    </table>
    <input type=hidden name="id" value="<?php echo $this->data[id]; ?>" />
</form>
<Script language="JavaScript">
    function  save(){
    	var vlidName= document.getElementById('idName');
    	if(vlidName.value==""){
    		alert('Tên tour không được rỗng');
    		flag=1;
    		return;
    	}
    	else{
			flag=0;
        	}
    	if(flag==0){
    		document.frm.submit();
    	}else{
        	document.location.href='/danhmuc/category/input';
        	}
    }

    function back(){
        document.location.href='/danhmuc/category/index';
    }
</Script>
</body>
</html>
